package cn.zh.controller;

import cn.zh.log.MyLog;
import cn.zh.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private HelloService helloService; //当前实例已经由starter完成了创建

    @MyLog(desc = "sayHello方法")
    @RequestMapping("/sayHello")
    public String sayHello() {
        return helloService.sayHello();
    }
}
